<template>
  子组件A
  <div class="nav">
    <template v-for="itemName in names" :key="itemName">
      <slot :itemName="itemName">1</slot>
    </template>
  </div>
</template>

<script>
export default {
  props: ['names'],
  methods: {
    btnClick() {
      console.log('子组件被点击了')
    },
  },
}
</script>

<style scoped>
.nav {
  width: 50px;
  height: 100px;
  background-color: pink;
}
</style>
